<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title><style>
     #box{
        width: 400px;
        height: 600px;
        border: 1px solid red;
      //  background-image: url(./img/1.jpj.webp) ;
     }
     img{
        width: 100%;
        height: 100%;
     }
    </style>
</head>
<body>
    <div id="box"><img src="./img/1.jpj.webp" alt="" id="img"></div>
    <input type="button" id="but1" value="1">
    <input type="button" id="but2" value="2">
    <input type="button" id="but3" value="3">
</body>
<script>
  var box=document.getElementById('box')
  var but1=document.getElementById('but1')
  var but2=document.getElementById('but2')
  var but3=document.getElementById('but3')
  var img=document.getElementById('img')

  
  but1.onclick = function(){
     img.src='./img/2.jpj.webp'
   
  }
  but2.onclick = function(){
     img.src='./img/3.jpj.webp'
   
  }
  but3.onclick = function(){
     img.src='./img/4.jpj.gif'
    
  }

</script>
</html>